/**   
 * 项目名：五位一体化工安全信息平台
 * 日期：    2019-12-10 08:35:29  
 * Copyright (c) 2015- joysuch-版权所有     
 */

package com.joysuch.wwyt.bp.entity;

import static javax.persistence.GenerationType.IDENTITY;
import java.util.Set;
import java.util.LinkedHashSet;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.JoinColumns;
import javax.persistence.JoinTable;
import javax.persistence.ManyToOne;
import javax.persistence.ManyToMany;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import javax.persistence.EntityListeners;

import com.joysuch.wwyt.core.support.AutoSetCommonFieldListener;

import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import org.hibernate.annotations.GenericGenerator;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

@EntityListeners({ AuditingEntityListener.class, AutoSetCommonFieldListener.class })
@Entity
@Table(name = "wwyt_bp_certificate")
public class BpCertificate implements java.io.Serializable{
    
    //columns START
    //
    private Long id;
    //作业类别
    private String homeworkId;
    //连续从事本工种时间（年）
    private Integer continuous;
    //证件编号
    private String cardNumber;
    //初领日期
    private java.util.Date earlyDate;
    //有效期限始
    private java.util.Date validityBegin;
    //有效期限终
    private java.util.Date validityEnd;
    //复审日期
    private java.util.Date recheckDate;
    //是否十年延期复审
    private String postpone;
    //准操项目
    private String holdProject;
    //操作证正面照片
    private Long imageId;
    //人员Id
    private Long usetId;
    //资质证件类型
    private Long groupId;
    //下载路径
    private String downloadurl;
    //文件名称
    private String name;
    //租户ID
    private Long tenentId;
    //组织机构代码
    private String orgCode;
    //columns END


    public void setId(Long value) {
        this.id = value;
    }
    
    @Id
    @GeneratedValue(strategy = IDENTITY)
    @Column(name = "Id", unique = true, nullable = false)
    public Long getId() {
        return this.id;
    }
    
     
    @Column(name = "HOMEWORK_ID", length = 20)
    public String getHomeworkId() {
        return this.homeworkId;
    }
    
    public void setHomeworkId(String value) {
        this.homeworkId = value;
    }
    
     
    @Column(name = "CONTINUOUS")
    public Integer getContinuous() {
        return this.continuous;
    }
    
    public void setContinuous(Integer value) {
        this.continuous = value;
    }
    
     
    @Column(name = "CARD_NUMBER", length = 100)
    public String getCardNumber() {
        return this.cardNumber;
    }
    
    public void setCardNumber(String value) {
        this.cardNumber = value;
    }
    
     
    @Column(name = "EARLY_DATE")
    public java.util.Date getEarlyDate() {
        return this.earlyDate;
    }
    
    public void setEarlyDate(java.util.Date value) {
        this.earlyDate = value;
    }
    
     
    @Column(name = "VALIDITY_BEGIN")
    public java.util.Date getValidityBegin() {
        return this.validityBegin;
    }
    
    public void setValidityBegin(java.util.Date value) {
        this.validityBegin = value;
    }
    
     
    @Column(name = "VALIDITY_END")
    public java.util.Date getValidityEnd() {
        return this.validityEnd;
    }
    
    public void setValidityEnd(java.util.Date value) {
        this.validityEnd = value;
    }
    
     
    @Column(name = "RECHECK_DATE")
    public java.util.Date getRecheckDate() {
        return this.recheckDate;
    }
    
    public void setRecheckDate(java.util.Date value) {
        this.recheckDate = value;
    }
    
     
    @Column(name = "POSTPONE", length = 2)
    public String getPostpone() {
        return this.postpone;
    }
    
    public void setPostpone(String value) {
        this.postpone = value;
    }
    
     
    @Column(name = "HOLD_PROJECT", length = 255)
    public String getHoldProject() {
        return this.holdProject;
    }
    
    public void setHoldProject(String value) {
        this.holdProject = value;
    }
    
     
    @Column(name = "IMAGE_ID")
    public Long getImageId() {
        return this.imageId;
    }
    
    public void setImageId(Long value) {
        this.imageId = value;
    }
    
     
    @Column(name = "USET_ID")
    public Long getUsetId() {
        return this.usetId;
    }
    
    public void setUsetId(Long value) {
        this.usetId = value;
    }
    
     
    @Column(name = "GROUP_ID")
    public Long getGroupId() {
        return this.groupId;
    }
    
    public void setGroupId(Long value) {
        this.groupId = value;
    }
    
     
    @Column(name = "DOWNLOADURL", length = 255)
    public String getDownloadurl() {
        return this.downloadurl;
    }
    
    public void setDownloadurl(String value) {
        this.downloadurl = value;
    }
    
     
    @Column(name = "NAME", length = 255)
    public String getName() {
        return this.name;
    }
    
    public void setName(String value) {
        this.name = value;
    }
    
     
    @Column(name = "TENENT_ID")
    public Long getTenentId() {
        return this.tenentId;
    }
    
    public void setTenentId(Long value) {
        this.tenentId = value;
    }
    
     
    @Column(name = "ORG_CODE", length = 100)
    public String getOrgCode() {
        return this.orgCode;
    }
    
    public void setOrgCode(String value) {
        this.orgCode = value;
    }
    

    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id",getId())
            .append("homeworkId",getHomeworkId())
            .append("continuous",getContinuous())
            .append("cardNumber",getCardNumber())
            .append("earlyDate",getEarlyDate())
            .append("validityBegin",getValidityBegin())
            .append("validityEnd",getValidityEnd())
            .append("recheckDate",getRecheckDate())
            .append("postpone",getPostpone())
            .append("holdProject",getHoldProject())
            .append("imageId",getImageId())
            .append("usetId",getUsetId())
            .append("groupId",getGroupId())
            .append("downloadurl",getDownloadurl())
            .append("name",getName())
            .append("tenentId",getTenentId())
            .append("orgCode",getOrgCode())
            .toString();
    }
    
    public int hashCode() {
        return new HashCodeBuilder()
            .append(getId())
            .toHashCode();
    }
    
    public boolean equals(Object obj) {
        if(obj instanceof BpCertificate == false) return false;
        if(this == obj) return true;
        BpCertificate other = (BpCertificate)obj;
        return new EqualsBuilder()
            .append(getId(),other.getId())
            .isEquals();
    }
}

